1. Technical Field
This invention generally relates to computer systems, and more specifically relates to apparatus and methods for improving access to data in a computer database.
2. Background Art
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database.
Retrieval of information from a database is typically done using queries. A database query typically includes one or more predicate expressions interconnected with logical operators. A predicate expression is a general term given to one of the following four kinds of expressions using one of the four kinds of operators (or their combinations): logical, relational, unary, and boolean, as shown in FIG. 2. A query usually specifies conditions that apply to one or more columns of the database, and may specify relatively complex logical operations on multiple columns. The database is searched for records that satisfy the query, and those records are returned as the query result.
In the prior art, a query containing a UNION statement would cause the database to run the query components on each side of the UNION operator and then combine the results. This can be very costly in computer time if there are common components on both sides of the UNION operator that are being executed twice. Without a way to reduce database query time to improve system performance, the computer industry will continue to suffer from excessive delays in database accesses.